package com.mall4j.cloud.user.service.impl;

import com.mall4j.cloud.user.mapper.UserCardsMapper;
import com.mall4j.cloud.user.model.UserCards;
import com.mall4j.cloud.user.service.UserCardsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserCardsServiceImpl implements UserCardsService {

    @Autowired
    private UserCardsMapper userCardsMapper;


    @Override
    public UserCards addUserCards(UserCards userCards) {
        userCardsMapper.insertUserCards(userCards);
        return userCards;
    }

    @Override
    public List<UserCards> getUserCardsByUserId(Long userId) {
        return userCardsMapper.getUserCardsByUserId(userId);
    }

    @Override
    public List<UserCards> getAllUserCards() {
        return userCardsMapper.getAllUserCards();
    }

    @Override
    public void updateUserCards(UserCards userCards) {
        userCardsMapper.updateUserCards(userCards);
    }

    @Override
    public void deleteUserCardsById(Long id) {
        userCardsMapper.deleteUserCardsById(id);
    }

    @Override
    public UserCards createUserCards(UserCards userCards) {
        return null;
    }
}
